package org.jshand.jxc.business.book.panel;

import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.Insets;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JButton;
import javax.swing.JPanel;

public class MenuPanel extends JPanel implements MouseListener {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public MenuPanel() {
		super();
		
		GridLayout gridLayout = new GridLayout(0,1,3,3);
		setLayout(gridLayout);
//		
//		btn.setIcon(SwingUtils.getImageIcon("application_osx_delete.png"));
		
//		JButton btn2 = new JButton(new ImageIcon(getClass().getClassLoader().getResource(SwingUtils.ICONPATH+"eject_blue.png") ));
//		btn2.setIcon(SwingUtils.getImageIcon("eject_blue.png"));
		
//		this.add(btn2);

		addBtnMenu("借/还书管理");
		addBtnMenu("图书管理");
		
		addBtnMenu("学生管理");
		addBtnMenu("abc");
//		addBtnMenu("abc");
//		addBtnMenu("abc");
//		addBtnMenu("abc");
//		addBtnMenu("abc");
//		addBtnMenu("abc");
//		addBtnMenu("abc");
		
		this.addMouseListener(this);
		
	}

	@Override
	public void mouseClicked(MouseEvent e) {}

	@Override
	public void mousePressed(MouseEvent e) {}

	@Override
	public void mouseReleased(MouseEvent e) {}

	@Override
	public void mouseEntered(MouseEvent e) {}

	@Override
	public void mouseExited(MouseEvent e) {}

	
	
	public JButton addBtnMenu(String icon){
		JPanel btnPanel = new JPanel();
		
		JButton btn = new JButton(icon);
		btnPanel.add(btn);
		
		this.add(btnPanel);
		return btn;
	}

	
}
